package com.fansl.allround.common.core.constant.enums;

import com.fansl.allround.common.core.constant.CommonConstants;
import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * @author fansl
 * @Description: TODO
 * @date 2019/11/4 14:12
 */
@Getter
public enum ResultEnum {
    /**
     * 失败
     */
    FAILED(CommonConstants.FAIL, "failed"),

    /**
     * 成功
     */
    SUCCESS(CommonConstants.SUCCESS, "success"),

    SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(),"server_error"),

    ;

    private final int code;

    private final String message;

    ResultEnum(int code,String message){
        this.code = code;
        this.message = message;
    }
}
